<template>
        <div class="persondetail" style="margin-top:20px">
          <el-tabs v-model="tabflag">
            <el-tab-pane :label="mytitle">
              <div style="padding:10px;">
                <el-input type="textarea" :rows="myrows" v-model="mycontent" maxlength="4000" show-word-limit></el-input>
                <el-button type="primary" style="margin-top:10px;clear:both" icon="el-icon-document-checked" @click="savecontent" :loading="saveloading">保存</el-button>
                <div style="padding:10px 10px 0;" v-if="message&&message!==''&&typeof(message)!=='object'">
                  <span v-if="objtype===myobjtypes.COMMON_TYPE_KAOHE_BANZI||objtype===myobjtypes.COMMON_TYPE_KAOHE_GEREN">考核情况：</span>
                  <span v-if="objtype===myobjtypes.COMMON_TYPE_YIBAOGAOLIANGPINGYI_BANZI||objtype===myobjtypes.COMMON_TYPE_YIBAOGAOLIANGPINGYI_GEREN">评议情况：</span>
                  <b>{{message}}</b>
                </div>
                <Chart v-if="objtype===myobjtypes.COMMON_TYPE_KAOHE_BANZI&&chartmsg&&typeof chartmsg ==='object'&&'Qunzhong_Banzi' in chartmsg" class="indexchart" id="mytestbanzi" height="450px" width="1400px" :option="op0" style="margin:20px;float:left" />
                <Chart v-if="objtype===myobjtypes.COMMON_TYPE_KAOHE_GEREN&&chartmsg&&typeof chartmsg ==='object'&&('Qunzhong_'+mytestid) in chartmsg" class="indexchart" id="mytestbanzi1" height="450px" width="600px" :option="op1" style="margin:20px;float:left" />
                <Chart v-if="objtype===myobjtypes.COMMON_TYPE_KAOHE_GEREN&&chartmsg&&typeof chartmsg ==='object'&&('Qunzhong_'+mytestid) in chartmsg" class="indexchart" id="mytestbanzi2" height="450px" width="600px" :option="op2" style="margin:20px;float:left" />
                <Chart v-if="objtype===myobjtypes.COMMON_TYPE_YIBAOGAOLIANGPINGYI_GEREN&&chartmsg&&typeof chartmsg ==='object'" class="indexchart" id="mytestbanzi3" height="450px" width="1400px" :option="op3" style="margin:20px;float:left" />
                <div v-if="objtype===myobjtypes.COMMON_TYPE_YIBAOGAOLIANGPINGYI_BANZI&&chartmsg&&typeof chartmsg ==='object'">
                  <h1>评议所在单位：{{message.unitname}}</h1>
                  <Chart class="indexchart" id="mytestbanzi4" height="450px" width="1400px" :option="op4" style="margin:20px;float:left" />
                  <Chart class="indexchart" id="mytestbanzi5" height="450px" width="1400px" :option="op5" style="margin:20px;float:left" />
                  <Chart class="indexchart" id="mytestbanzi6" height="450px" width="1400px" :option="op6" style="margin:20px;float:left" />
                  <h1 style="clear:both;padding:5px 25px;">4. 您对解决上述存在的突出问题有何意见建议？</h1>
                  <table class="ticketTable" cellspacing="0" cellpadding="0">
                    <tr><th width="80" align="center">序号</th><th width="150" align="center">选票类型</th><th align="center">意见建议</th></tr>
                    <template v-if="chartmsg&&chartmsg.A_Banzi&&JSON.parse(chartmsg.A_Banzi).dtopic7">
                      <tr v-for="(item,index) in JSON.parse(chartmsg.A_Banzi).dtopic7.split('@')" :key="item"><td align="center">{{index+1}}</td><td align="center">A类选票</td><td>{{item}}</td></tr>
                    </template>
                    <template v-if="chartmsg&&chartmsg.B_Banzi&&JSON.parse(chartmsg.B_Banzi).dtopic7">
                      <tr v-for="(item,index) in JSON.parse(chartmsg.B_Banzi).dtopic7.split('@')" :key="item"><td align="center">{{index+1+JSON.parse(chartmsg.A_Banzi).dtopic7Num}}</td><td align="center">B类选票</td><td>{{item}}</td></tr>
                    </template>
                  </table>
                  <h1 style="clear:both;padding:5px 25px;">5. 您对本地区（单位）选人用人工作还有其他什么意见和建议？</h1>
                  <table class="ticketTable" cellspacing="0" cellpadding="0">
                    <tr><th width="80" align="center">序号</th><th width="150" align="center">选票类型</th><th align="center">意见建议</th></tr>
                    <template v-if="chartmsg&&chartmsg.A_Banzi&&JSON.parse(chartmsg.A_Banzi).dtopic8">
                    <tr v-for="(item,index) in JSON.parse(chartmsg.A_Banzi).dtopic8.split('@')" :key="item"><td align="center">{{index+1}}</td><td align="center">A类选票</td><td>{{item}}</td></tr>
                    </template>
                    <template v-if="chartmsg&&chartmsg.B_Banzi&&JSON.parse(chartmsg.B_Banzi).dtopic8">
                      <tr v-for="(item,index) in JSON.parse(chartmsg.B_Banzi).dtopic8.split('@')" :key="item"><td align="center">{{index+1+JSON.parse(chartmsg.A_Banzi).dtopic8Num}}</td><td align="center">B类选票</td><td>{{item}}</td></tr>
                    </template>
                  </table>
                </div>
                <!-- <Chart v-if="objtype===myobjtypes.COMMON_TYPE_KAOHE_GEREN&&('Qunzhong_'+personId) in chartmsg" class="indexchart" id="mytestbanzi2" height="450px" width="600px" :option="op2" style="margin:20px;float:left" /> -->
              </div>
            </el-tab-pane>
            <el-tab-pane label="附件列表">
              <el-table :height="fjheight" :data="filename">
                <el-table-column type="index" label=" " width="50" fixed align="center" class-name="tableth"></el-table-column>
                <el-table-column label="文件名">
                  <template slot-scope="scope">
                    {{scope.row}}
                  </template>
                </el-table-column>
                <el-table-column label="操作" width="200">
                  <template slot-scope="scope">
                    <el-button size="small" @click="delfj(filepathname[scope.$index],myobject.id)" type="text" icon="el-icon-download">删除</el-button>
                    <el-button size="small" @click="fjdownload(filepathname[scope.$index],myobject.id)" type="text" icon="el-icon-download">下载</el-button>
                  </template>
                </el-table-column>
              </el-table>
              <el-upload class="upload-demo" :on-success="uploadsuccess" name="file" :file-list="uploadfilelist"
                :action="this.$http.defaults.baseURL + 'common/base/upload/'+this.myobject.id" with-credentials :on-error='uploaderror'>
                <el-button type="primary" icon="el-icon-paperclip">上传附件</el-button>
              </el-upload>
            </el-tab-pane>
          </el-tabs>
        </div>
</template>
<script>
import * as objtypes from '@/constvalue/commonvalues'
import Chart from '@/components/Chart.vue'
export default {
  components: {
    Chart
  },
  watch: {
    showunitname: {
      handler (val) {
      },
      immediate: true
    },
    title: {
      handler (val) {
      },
      immediate: true
    },
    objtype: {
      handler (val) {
      },
      immediate: true
    },
    personId: {
      handler (val) {
        console.log('personId:')
        console.log(val)
        this.mytestid = val
      },
      immediate: true
    },
    theyear: {
      handler (val) {
        this.getDetail()
      },
      immediate: true
    },
    myheight: {
      handler (val) {
        if (val === 1) {
          this.fjheight = '238px'
          this.myrows = 8
        }
        if (val === 2) {
          this.fjheight = '242px'
          this.myrows = 7
        }
      },
      immediate: true
    }
  },
  props: {
    title: '',
    objtype: '',
    personId: '',
    showunitname: '',
    theyear: '',
    myheight: ''
  },
  data () {
    return {
      myobjtypes: objtypes,
      op2: {
        'calculable': true,
        'legend': {
          'data': ['优秀', '称职', '基本称职', '不称职'],
          'orient': 'vertical',
          'x': 'right',
          'y': 'center'
        },
        'series': [{
          'data': [],
          'center': ['50%', '50%'],
          'name': '',
          'type': 'pie',
          'radius': [0, '30%']
        }, {
          'data': [],
          'center': ['50%', '50%'],
          'name': '',
          'type': 'pie',
          'radius': ['60%', '70%']
        }],
        'title': {
          'text': '总体评价'
        },
        'toolbox': {
          'feature': {
            'saveAsImage': {
              'show': true
            },
            'restore': {
              'show': true
            },
            'magicType': {
              'show': true,
              'type': ['pie', 'funnel'],
              'option': {
                'funnel': {
                  'max': '1548',
                  'x': '25%',
                  'width': '50%',
                  'funnelAlign': 'left'
                }
              }
            },
            'dataView': {
              'show': true,
              'readOnly': false
            },
            'mark': {
              'show': true
            }
          },
          'show': true
        },
        'tooltip': {
          'formatter': function (params) {
            return params.data.name + '（' + params.data.label + '）：' + params.data.value
          },
          'trigger': 'item'
        }
      },
      op1: {
        title: {
          text: ''
        },
        tooltip: {},
        legend: {
          data: ['群众票得分', '领导票得分', '综合得分'],
          'orient': 'vertical',
          'x': 'right',
          'y': 'center'
        },
        'toolbox': {
          'feature': {
            'saveAsImage': {
              'show': true
            },
            'restore': {
              'show': true
            },
            'magicType': {
              'show': true,
              'type': ['radar', 'funnel'],
              'option': {
                'funnel': {
                  'max': '1548',
                  'x': '25%',
                  'width': '50%',
                  'funnelAlign': 'left'
                }
              }
            },
            'dataView': {
              'show': true,
              'readOnly': false
            },
            'mark': {
              'show': true
            }
          },
          'show': true
        },
        radar: {
          shape: 'circle',
          name: {
            textStyle: {
              color: '#fff',
              backgroundColor: '#999',
              borderRadius: 3,
              padding: [3, 5]
            }
          },
          indicator: [
            {name: '总分（100分）', max: 100},
            {name: '德（20分）', max: 20},
            {name: '能（30分）', max: 30},
            {name: '勤（10分）', max: 10},
            {name: '绩（20分）', max: 20},
            {name: '廉（20分）', max: 20}
          ]
        },
        series: [{
          name: '评分情况',
          type: 'radar',
          // areaStyle: {normal: {}},
          data: [
            {
              value: [],
              name: '群众票得分'
            },
            {
              value: [],
              name: '领导票得分'
            },
            {
              value: [],
              name: '综合得分'
            }
          ]
        }]
      },
      op0: {
        title: {
          text: ''
        },
        tooltip: {},
        legend: {
          data: ['群众', '领导', '综合'],
          'orient': 'vertical',
          'x': 'right',
          'y': 'center'
        },
        'toolbox': {
          'feature': {
            'saveAsImage': {
              'show': true
            },
            'restore': {
              'show': true
            },
            'magicType': {
              'show': true,
              'type': ['radar', 'funnel'],
              'option': {
                'funnel': {
                  'max': '1548',
                  'x': '25%',
                  'width': '50%',
                  'funnelAlign': 'left'
                }
              }
            },
            'dataView': {
              'show': true,
              'readOnly': false
            },
            'mark': {
              'show': true
            }
          },
          'show': true
        },
        radar: {
          shape: 'circle',
          name: {
            textStyle: {
              color: '#fff',
              backgroundColor: '#999',
              borderRadius: 3,
              padding: [3, 5]
            }
          },
          indicator: [
            {name: '总分（100分）', max: 100},
            {name: '政治思想建设方面（25分）', max: 25},
            {name: '领导能力和工作能力方面（25分）', max: 25},
            {name: '担当作为、履职尽责方面（20分）', max: 20},
            {name: '作风建设方面（20分）', max: 20},
            {name: '党风廉政建设方面（10分）', max: 10}
          ]
        },
        series: [{
          name: '评分情况',
          type: 'radar',
          // areaStyle: {normal: {}},
          data: [
            {
              value: [],
              name: '群众'
            },
            {
              value: [],
              name: '领导'
            },
            {
              value: [],
              name: '综合'
            }
          ]
        }]
      },
      op3: {
        title: [{
          text: '新提拔干部民主评议'
        }, {
          subtext: 'A类选票',
          left: '16.67%',
          top: '75%',
          textAlign: 'center'
        }, {
          subtext: 'B类选票',
          left: '50%',
          top: '75%',
          textAlign: 'center'
        }, {
          subtext: '合计',
          left: '83.33%',
          top: '75%',
          textAlign: 'center'
        }],
        tooltip: {
          trigger: 'item',
          formatter: '{b} : {c} ({d}%)'
        },
        series: [{
          type: 'pie',
          radius: '25%',
          center: ['50%', '50%'],
          data: [],
          animation: false,
          label: {
            position: 'outer',
            alignTo: 'none',
            bleedMargin: 5
          },
          left: 0,
          right: '66.6667%',
          top: 0,
          bottom: 0
        }, {
          type: 'pie',
          radius: '25%',
          center: ['50%', '50%'],
          data: [],
          animation: false,
          label: {
            position: 'outer',
            alignTo: 'labelLine',
            bleedMargin: 5
          },
          left: '33.3333%',
          right: '33.3333%',
          top: 0,
          bottom: 0
        }, {
          type: 'pie',
          radius: '25%',
          center: ['50%', '50%'],
          data: [],
          animation: false,
          label: {
            position: 'outer',
            alignTo: 'edge',
            margin: 20
          },
          left: '66.6667%',
          right: 0,
          top: 0,
          bottom: 0
        }]
      },
      op4: {
        title: [{
          text: '1. 对本地区（单位）选人用人工作的总体评价'
        }, {
          subtext: 'A类选票',
          left: '16.67%',
          top: '75%',
          textAlign: 'center'
        }, {
          subtext: 'B类选票',
          left: '50%',
          top: '75%',
          textAlign: 'center'
        }, {
          subtext: '合计',
          left: '83.33%',
          top: '75%',
          textAlign: 'center'
        }],
        tooltip: {
          trigger: 'item',
          formatter: '{b} : {c} ({d}%)'
        },
        series: [{
          type: 'pie',
          radius: '25%',
          center: ['50%', '50%'],
          data: [],
          animation: false,
          label: {
            position: 'outer',
            alignTo: 'none',
            bleedMargin: 5
          },
          left: 0,
          right: '66.6667%',
          top: 0,
          bottom: 0
        }, {
          type: 'pie',
          radius: '25%',
          center: ['50%', '50%'],
          data: [],
          animation: false,
          label: {
            position: 'outer',
            alignTo: 'labelLine',
            bleedMargin: 5
          },
          left: '33.3333%',
          right: '33.3333%',
          top: 0,
          bottom: 0
        }, {
          type: 'pie',
          radius: '25%',
          center: ['50%', '50%'],
          data: [],
          animation: false,
          label: {
            position: 'outer',
            alignTo: 'edge',
            margin: 20
          },
          left: '66.6667%',
          right: 0,
          top: 0,
          bottom: 0
        }]
      },
      op5: {
        title: [{
          text: '2. 对本地区（单位）从严管理监督干部情况的评价'
        }, {
          subtext: 'A类选票',
          left: '16.67%',
          top: '75%',
          textAlign: 'center'
        }, {
          subtext: 'B类选票',
          left: '50%',
          top: '75%',
          textAlign: 'center'
        }, {
          subtext: '合计',
          left: '83.33%',
          top: '75%',
          textAlign: 'center'
        }],
        tooltip: {
          trigger: 'item',
          formatter: '{b} : {c} ({d}%)'
        },
        series: [{
          type: 'pie',
          radius: '25%',
          center: ['50%', '50%'],
          data: [],
          animation: false,
          label: {
            position: 'outer',
            alignTo: 'none',
            bleedMargin: 5
          },
          left: 0,
          right: '66.6667%',
          top: 0,
          bottom: 0
        }, {
          type: 'pie',
          radius: '25%',
          center: ['50%', '50%'],
          data: [],
          animation: false,
          label: {
            position: 'outer',
            alignTo: 'labelLine',
            bleedMargin: 5
          },
          left: '33.3333%',
          right: '33.3333%',
          top: 0,
          bottom: 0
        }, {
          type: 'pie',
          radius: '25%',
          center: ['50%', '50%'],
          data: [],
          animation: false,
          label: {
            position: 'outer',
            alignTo: 'edge',
            margin: 20
          },
          left: '66.6667%',
          right: 0,
          top: 0,
          bottom: 0
        }]
      },
      op6: {
        title: [{
          text: '3. 您认为本地区（单位）选人用人工作存在的主要问题是什么？（可多选）'
        }],
        tooltip: {
          trigger: 'axis',
          axisPointer: { // 坐标轴指示器，坐标轴触发有效
            type: 'shadow' // 默认为直线，可选为：'line' | 'shadow'
          }
        },
        legend: {
          data: ['A类选票', 'B类选票']
        },
        grid: {
          left: '3%',
          right: '4%',
          bottom: '3%',
          containLabel: true
        },
        xAxis: {
          type: 'value'
        },
        yAxis: {
          type: 'category',
          data: [
            '⑬以上问题均不存在',
            '⑫干部队伍建设缺少统筹谋划，结构不合理',
            '⑪超职数配备、超机构规格提拔领导干部，超审批权限设置机构配备干部，擅自设置职务名称、提高干部职务职级待遇',
            '⑩执行干部工作制度规定不严格',
            '⑨跑官要官、买官卖官、说情打招呼',
            '⑧坚持民主集中制不到位，“个人说了算”',
            '⑦任人唯亲、排斥异己，拉帮结派、搞团团伙伙',
            '⑥论资排辈情况严重',
            '⑤坚持事业为上不够，不能做到以事择人、人岗相适',
            '④选人用人导向不鲜明',
            '③坚持好干部标准不够，选人用人质量不高',
            '②党委（党组）履行选人用人职责不到位',
            '①落实党的干部工作方针政策有差距'
          ]
        },
        series: [
          {
            name: 'A类选票',
            type: 'bar',
            stack: '总量',
            label: {
              show: true,
              position: 'inside'
            },
            data: []
          },
          {
            name: 'B类选票',
            type: 'bar',
            stack: '总量',
            label: {
              show: true,
              position: 'inside'
            },
            data: []
          }
        ]
      },
      chartmsg: {},
      fjheight: '130px',
      myrows: 4,
      message: '',
      mycontent: '',
      tabflag: '',
      saveloading: false,
      uploadfilelist: [],
      filename: [],
      filepathname: [],
      myobject: {},
      mytitle: '',
      // mytestid: '110102196211082773',
      mytestid: '',
      chartmsg1: {
        'A_11111': '1@1@0@1',
        'B_11111': '0@1@1@0',
        'All_11111': '1@2@1@1',
        'A_Banzi': {
          'dtopic1': '3,0,0,0',
          'dtopic2': '0,3,0,0',
          'dtopic6': ['2', '3', '2', '3', '2', '2', '1', '2', '1', '2', '0', '0', '0'],
          'dtopic7': '得得得红米嘻嘻嘻嘻@测试一下',
          'dtopic7Num': 2,
          'dtopic8': '111得得得红米嘻嘻嘻嘻@222测试一下',
          'dtopic8Num': 2
        },
        'B_Banzi': {
          'dtopic1': '1,0,1,0',
          'dtopic2': '1,1,0,0',
          'dtopic6': ['1', '0', '1', '0', '0', '1', '0', '0', '0', '1', '1', '1', '1'],
          'dtopic7': '有很多问题，很多问题，用人单位的问题，个人的问题有很多说不清楚。',
          'dtopic7Num': 1,
          'dtopic8': '3333有很多问题，很多问题，用人单位的问题，个人的问题有很多说不清楚。',
          'dtopic8Num': 1
        },
        'All_Banzi': {
          'dtopic1': '4,0,1,0',
          'dtopic2': '1,4,0,0',
          'dtopic6': ['3', '3', '3', '3', '2', '3', '1', '2', '1', '3', '1', '3', '1'],
          'dtopic7': '得得得红米嘻嘻嘻嘻@有很多问题，很多问题，用人单位的问题，个人的问题有很多说不清楚。@测试一下',
          'dtopic7Num': 3,
          'dtopic8': '得得得红米嘻嘻嘻嘻@有很多问题，很多问题，用人单位的问题，个人的问题有很多说不清楚。@测试一下',
          'dtopic8Num': 3
        }
      }
    }
  },
  methods: {
    delfj (filepathname, id) {
      this.$confirm('确定要删除该附件吗?', '提示', {
        type: 'success'
      }).then(() => {
        let para = {
          id: id,
          filepathname: filepathname
        }
        this.$http
          .post(`/common/base/removefj/`, para)
          .then(response => {
            if (response.data.success === true) {
              this.$message({
                message: '删除成功',
                type: 'success'
              })
              this.getDetail()
            } else {
              this.$message({
                message: response.data.message,
                type: 'error'
              })
            }
          })
          .catch(error => {
            this.$message({
              message: '删除失败:' + error,
              type: 'error'
            })
          })
      })
    },
    fjdownload (filepathname, id) {
      window.open(this.$http.defaults.baseURL + 'common/base/file/' + id + '/' + filepathname)
    },
    uploaderror (err) {
      console.log('具体错误')
      console.log(err)
      this.$message({
        message: '上传失败：' + err,
        type: 'error'
      })
    },
    uploadsuccess () {
      this.getDetail()
      this.uploadfilelist = []
    },
    savecontent () {
      let para = {
        id: this.myobject.id,
        content: this.mycontent
      }
      this.saveloading = true
      this.$http
        .post(`/common/savebase/`, para)
        .then(response => {
          if (response.data.success === true) {
            this.$message({
              message: '保存成功',
              type: 'success'
            })
          } else {
            this.$message({
              message: response.data.message,
              type: 'error'
            })
          }
          this.saveloading = false
        })
        .catch(error => {
          this.$message({
            message: '保存失败:' + error,
            type: 'error'
          })
          this.saveloading = false
        })
    },
    getDetail () {
      this.myobject = {}
      let url = ''
      if (this.theyear) {
        url = `/common/base/` + this.personId + '/' + this.objtype + '/' + this.theyear
      } else {
        console.log(this.objtype)
        url = `/common/base/` + this.personId + '/' + this.objtype
        // if (this.objtype === '10' || this.objtype === '11') {
        //   url = `/common/base/` + this.personId + '/' + this.objtype + '/0'
        // } else {
        //   url = `/common/base/` + this.personId + '/' + this.objtype
        // }
      }

      this.$http
        .get(url)
        .then(response => {
          this.myobject = response.data.content
          this.message = response.data.message
          this.chartmsg = response.data.message
          if (this.objtype === this.myobjtypes.COMMON_TYPE_YIBAOGAOLIANGPINGYI_GEREN) {
            if (this.chartmsg && typeof (this.chartmsg) === 'object' && JSON.stringify(this.chartmsg) !== '{}') {
              let topic1A = this.chartmsg['A_' + this.mytestid].split('@')
              let topic1B = this.chartmsg['B_' + this.mytestid].split('@')
              let topic1All = this.chartmsg['All_' + this.mytestid].split('@')
              let mydata = [{name: '认同', value: 0}, {name: '基本认同', value: 0}, {name: '不认同', value: 0}, {name: '不了解', value: 0}]
              let mydataA = JSON.parse(JSON.stringify(mydata))
              let mydataB = JSON.parse(JSON.stringify(mydata))
              let mydataAll = JSON.parse(JSON.stringify(mydata))
              for (let i = 0; i < mydata.length; i++) {
                mydataA[i].value = topic1A[i]
                mydataB[i].value = topic1B[i]
                mydataAll[i].value = topic1All[i]
              }
              this.op3.series[0].data = mydataA
              this.op3.series[1].data = mydataB
              this.op3.series[2].data = mydataAll
            }
          } else if (this.objtype === this.myobjtypes.COMMON_TYPE_YIBAOGAOLIANGPINGYI_BANZI) {
            if (this.chartmsg && typeof (this.chartmsg) === 'object' && JSON.stringify(this.chartmsg) !== '{}') {
            // 第一题
              let topic1A = JSON.parse(this.chartmsg.A_Banzi).dtopic1.split(',')
              let topic1B = JSON.parse(this.chartmsg.B_Banzi).dtopic1.split(',')
              let topic1All = JSON.parse(this.chartmsg.All_Banzi).dtopic1.split(',')
              let mydata = [{name: '好', value: 0}, {name: '一般', value: 0}, {name: '不好', value: 0}, {name: '不了解', value: 0}]
              let mydataA = JSON.parse(JSON.stringify(mydata))
              let mydataB = JSON.parse(JSON.stringify(mydata))
              let mydataAll = JSON.parse(JSON.stringify(mydata))
              for (let i = 0; i < mydata.length; i++) {
                mydataA[i].value = topic1A[i]
                mydataB[i].value = topic1B[i]
                mydataAll[i].value = topic1All[i]
              }
              this.op4.series[0].data = mydataA
              this.op4.series[1].data = mydataB
              this.op4.series[2].data = mydataAll
              // // 第二题
              topic1A = JSON.parse(this.chartmsg.A_Banzi).dtopic2.split(',')
              topic1B = JSON.parse(this.chartmsg.B_Banzi).dtopic2.split(',')
              topic1All = JSON.parse(this.chartmsg.All_Banzi).dtopic2.split(',')
              mydata = [{name: '好', value: 0}, {name: '一般', value: 0}, {name: '不好', value: 0}, {name: '不了解', value: 0}]
              mydataA = JSON.parse(JSON.stringify(mydata))
              mydataB = JSON.parse(JSON.stringify(mydata))
              mydataAll = JSON.parse(JSON.stringify(mydata))
              for (let i = 0; i < mydata.length; i++) {
                mydataA[i].value = topic1A[i]
                mydataB[i].value = topic1B[i]
                mydataAll[i].value = topic1All[i]
              }
              this.op5.series[0].data = mydataA
              this.op5.series[1].data = mydataB
              this.op5.series[2].data = mydataAll
              // 第三题
              topic1A = JSON.parse(this.chartmsg.A_Banzi).dtopic6
              topic1B = JSON.parse(this.chartmsg.B_Banzi).dtopic6
              console.log(topic1A.map(i => parseInt(i, 0)))
              console.log(topic1B.map(i => parseInt(i, 0)))
              this.op6.series[0].data = topic1A.map(i => parseInt(i, 0))
              this.op6.series[1].data = topic1B.map(i => parseInt(i, 0))
            }
          } else {
            if (this.chartmsg && typeof this.chartmsg === 'object' && 'Qunzhong_Banzi' in this.chartmsg) {
              this.message = ''
              this.op0.title.text = this.chartmsg.unitname
              // console.log(JSON.stringify(this.op0.series[0].data[0].value))
              this.op0.series[0].data[0].value = []
              this.op0.series[0].data[1].value = []
              this.op0.series[0].data[2].value = []
              if (this.chartmsg.Qunzhong_Banzi && this.chartmsg.Qunzhong_Banzi !== '') {
                let qunzhongBanzi = JSON.parse(this.chartmsg.Qunzhong_Banzi)
                this.op0.series[0].data[0].value.push(qunzhongBanzi.all)
                this.op0.series[0].data[0].value.push(qunzhongBanzi.dtopic1)
                this.op0.series[0].data[0].value.push(qunzhongBanzi.dtopic2)
                this.op0.series[0].data[0].value.push(qunzhongBanzi.dtopic3)
                this.op0.series[0].data[0].value.push(qunzhongBanzi.dtopic4)
                this.op0.series[0].data[0].value.push(qunzhongBanzi.dtopic5)
              }
              if (this.chartmsg.Lingdao_Banzi && this.chartmsg.Lingdao_Banzi !== '') {
                let lingdaoBanzi = JSON.parse(this.chartmsg.Lingdao_Banzi)
                this.op0.series[0].data[1].value.push(lingdaoBanzi.all)
                this.op0.series[0].data[1].value.push(lingdaoBanzi.dtopic1)
                this.op0.series[0].data[1].value.push(lingdaoBanzi.dtopic2)
                this.op0.series[0].data[1].value.push(lingdaoBanzi.dtopic3)
                this.op0.series[0].data[1].value.push(lingdaoBanzi.dtopic4)
                this.op0.series[0].data[1].value.push(lingdaoBanzi.dtopic5)
              }
              if (this.chartmsg.All_Banzi && this.chartmsg.All_Banzi !== '') {
                let allBanzi = JSON.parse(this.chartmsg.All_Banzi)
                this.op0.series[0].data[2].value.push(allBanzi.all)
                this.op0.series[0].data[2].value.push(allBanzi.dtopic1)
                this.op0.series[0].data[2].value.push(allBanzi.dtopic2)
                this.op0.series[0].data[2].value.push(allBanzi.dtopic3)
                this.op0.series[0].data[2].value.push(allBanzi.dtopic4)
                this.op0.series[0].data[2].value.push(allBanzi.dtopic5)
              }
              console.log(JSON.stringify(this.op0.series[0]))
            }
            if (this.chartmsg && typeof this.chartmsg === 'object' && 'Qunzhong_' + this.mytestid in this.chartmsg) {
              this.op1.series[0].data[0].value = []
              this.op1.series[0].data[1].value = []
              this.op1.series[0].data[2].value = []
              if (this.chartmsg['Qunzhong_' + this.mytestid] && this.chartmsg['Qunzhong_' + this.mytestid] !== '') {
                let qunzhong = JSON.parse(this.chartmsg['Qunzhong_' + this.mytestid])
                this.op1.series[0].data[0].value.push(qunzhong.all)
                this.op1.series[0].data[0].value.push(qunzhong.topic1 + qunzhong.topic2)
                this.op1.series[0].data[0].value.push(qunzhong.topic3 + qunzhong.topic4 + qunzhong.topic5)
                this.op1.series[0].data[0].value.push(qunzhong.topic6 + qunzhong.topic7)
                this.op1.series[0].data[0].value.push(qunzhong.topic8 + qunzhong.topic9)
                this.op1.series[0].data[0].value.push(qunzhong.topic10 + qunzhong.topic11)
              }
              if (this.chartmsg['Lingdao_' + this.mytestid] && this.chartmsg['Lingdao_' + this.mytestid] !== '') {
                this.op1.series[0].data[1].value.push(JSON.parse(this.chartmsg['Lingdao_' + this.mytestid]).all)
                this.op1.series[0].data[1].value.push(JSON.parse(this.chartmsg['Lingdao_' + this.mytestid]).topic1 + JSON.parse(this.chartmsg['Lingdao_' + this.mytestid]).topic2)
                this.op1.series[0].data[1].value.push(JSON.parse(this.chartmsg['Lingdao_' + this.mytestid]).topic3 + JSON.parse(this.chartmsg['Lingdao_' + this.mytestid]).topic4 + JSON.parse(this.chartmsg['Lingdao_' + this.mytestid]).topic5)
                this.op1.series[0].data[1].value.push(JSON.parse(this.chartmsg['Lingdao_' + this.mytestid]).topic6 + JSON.parse(this.chartmsg['Lingdao_' + this.mytestid]).topic7)
                this.op1.series[0].data[1].value.push(JSON.parse(this.chartmsg['Lingdao_' + this.mytestid]).topic8 + JSON.parse(this.chartmsg['Lingdao_' + this.mytestid]).topic9)
                this.op1.series[0].data[1].value.push(JSON.parse(this.chartmsg['Lingdao_' + this.mytestid]).topic10 + JSON.parse(this.chartmsg['Lingdao_' + this.mytestid]).topic11)
              }
              if (this.chartmsg['All_' + this.mytestid] && this.chartmsg['All_' + this.mytestid] !== '') {
                this.op1.series[0].data[2].value.push(JSON.parse(this.chartmsg['All_' + this.mytestid]).all)
                this.op1.series[0].data[2].value.push(JSON.parse(this.chartmsg['All_' + this.mytestid]).topic1 + JSON.parse(this.chartmsg['All_' + this.mytestid]).topic2)
                this.op1.series[0].data[2].value.push(JSON.parse(this.chartmsg['All_' + this.mytestid]).topic3 + JSON.parse(this.chartmsg['All_' + this.mytestid]).topic4 + JSON.parse(this.chartmsg['All_' + this.mytestid]).topic5)
                this.op1.series[0].data[2].value.push(JSON.parse(this.chartmsg['All_' + this.mytestid]).topic6 + JSON.parse(this.chartmsg['All_' + this.mytestid]).topic7)
                this.op1.series[0].data[2].value.push(JSON.parse(this.chartmsg['All_' + this.mytestid]).topic8 + JSON.parse(this.chartmsg['All_' + this.mytestid]).topic9)
                this.op1.series[0].data[2].value.push(JSON.parse(this.chartmsg['All_' + this.mytestid]).topic10 + JSON.parse(this.chartmsg['All_' + this.mytestid]).topic11)
              }
              this.op2.series[0].data = []
              this.op2.series[1].data = []
              if (this.chartmsg['All_' + this.mytestid] && this.chartmsg['All_' + this.mytestid] !== '') {
                this.op2.series[0].data.push({name: '优秀', label: '综合', value: JSON.parse(this.chartmsg['All_' + this.mytestid]).msg.split('@')[0]})
                this.op2.series[0].data.push({name: '称职', label: '综合', value: JSON.parse(this.chartmsg['All_' + this.mytestid]).msg.split('@')[1]})
                this.op2.series[0].data.push({name: '基本称职', label: '综合', value: JSON.parse(this.chartmsg['All_' + this.mytestid]).msg.split('@')[2]})
                this.op2.series[0].data.push({name: '不称职', label: '综合', value: JSON.parse(this.chartmsg['All_' + this.mytestid]).msg.split('@')[3]})
              }
              if (this.chartmsg['Lingdao_' + this.mytestid] && this.chartmsg['Lingdao_' + this.mytestid] !== '') {
                this.op2.series[1].data.push({name: '优秀', label: '领导', value: JSON.parse(this.chartmsg['Lingdao_' + this.mytestid]).msg.split('@')[0]})
              }
              if (this.chartmsg['Qunzhong_' + this.mytestid] && this.chartmsg['Qunzhong_' + this.mytestid] !== '') {
                this.op2.series[1].data.push({name: '优秀', label: '群众', value: JSON.parse(this.chartmsg['Qunzhong_' + this.mytestid]).msg.split('@')[0]})
              }
              if (this.chartmsg['Lingdao_' + this.mytestid] && this.chartmsg['Lingdao_' + this.mytestid] !== '') {
                this.op2.series[1].data.push({name: '称职', label: '领导', value: JSON.parse(this.chartmsg['Lingdao_' + this.mytestid]).msg.split('@')[1]})
              }
              if (this.chartmsg['Qunzhong_' + this.mytestid] && this.chartmsg['Qunzhong_' + this.mytestid] !== '') {
                this.op2.series[1].data.push({name: '称职', label: '群众', value: JSON.parse(this.chartmsg['Qunzhong_' + this.mytestid]).msg.split('@')[1]})
              }
              if (this.chartmsg['Lingdao_' + this.mytestid] && this.chartmsg['Lingdao_' + this.mytestid] !== '') {
                this.op2.series[1].data.push({name: '基本称职', label: '领导', value: JSON.parse(this.chartmsg['Lingdao_' + this.mytestid]).msg.split('@')[2]})
              }
              if (this.chartmsg['Qunzhong_' + this.mytestid] && this.chartmsg['Qunzhong_' + this.mytestid] !== '') {
                this.op2.series[1].data.push({name: '基本称职', label: '群众', value: JSON.parse(this.chartmsg['Qunzhong_' + this.mytestid]).msg.split('@')[2]})
              }
              if (this.chartmsg['Lingdao_' + this.mytestid] && this.chartmsg['Lingdao_' + this.mytestid] !== '') {
                this.op2.series[1].data.push({name: '不称职', label: '领导', value: JSON.parse(this.chartmsg['Lingdao_' + this.mytestid]).msg.split('@')[3]})
              }
              if (this.chartmsg['Qunzhong_' + this.mytestid] && this.chartmsg['Qunzhong_' + this.mytestid] !== '') {
                this.op2.series[1].data.push({name: '不称职', label: '群众', value: JSON.parse(this.chartmsg['Qunzhong_' + this.mytestid]).msg.split('@')[3]})
              }
            }
          }
          this.mycontent = this.myobject.thecontent
          if (this.myobject.filepathname) {
            this.filepathname = JSON.parse(this.myobject.filepathname)
          } else {
            this.filepathname = []
          }
          if (this.myobject.filename) {
            this.filename = JSON.parse(this.myobject.filename)
          } else {
            this.filename = []
          }
          if (this.showunitname) {
            this.mytitle = this.myobject.unitname + this.title
          } else {
            this.mytitle = this.title
          }
        })
        .catch(error => {
          console.log(error)
          this.$message({
            message: '网络获取失败:' + error,
            type: 'error'
          })
        })
    }

  },
  mounted () {
    this.getDetail()
  }
}
</script>
<style>
#zhfxyp .el-table td, .el-table th{
  padding:2px 0;
}
#zhfxyp .el-textarea__inner{
  font-size:var(--size18) !important;
  color:#000 !important;
}
.ticketTable{
    border-top: 1px solid #74A6CC;
    border-left: 1px solid #74A6CC;
    margin: 10px;
    width: calc(100% - 20px);
}
.ticketTable td ,.ticketTable th {
    padding: 10px;
    border-right: 1px solid #74A6CC;
    border-bottom: 1px solid #74A6CC;
    vertical-align: top;
    line-height: 150%;
}
.ticketTable th {
  background: #C0DCF1;
}
</style>
